<template>
  <svg-icon v-if="iconName" :icon-class="iconName" v-bind="$attrs" v-on="$listeners" />
  <i v-else :class="usedType" v-bind="$attrs" v-on="$listeners" />
</template>

<script>
export default {
  name: 'MyIcon',
  props: {
    type: { type: String, default: '' },
    iconName: { type: String, default: '' }
  },
  computed: {
    usedType() {
      return this.type ? `el-icon-${this.type}` : ''
    }
  }
}
</script>

<style>

</style>
